<script setup>
	import { useRoute } from "vue-router";
	import { useUserStore } from "./store/user";
	import { onUnload } from "@dcloudio/uni-app";

	const useStore = useUserStore();
	const route = useRoute();
	const { api_get_homeConfig } = useRequest();

	onLaunch(() => {
		if (route.query.tenantId) {
			useStore.settenantId(route.query.tenantId);
		}
		api_get_homeConfig().then(res => {
			useStore.settenantConfig(res)
		})
	});

	onUnload(() => {
		uni.removeStorage({
			key: 'noMemorialize',
			success: function(res) {
				console.log('success');
			}
		})
	})
</script>
<style lang="scss">
	/*每个页面公共css */
	@import '@/styles/generate.scss';
	@import '@/styles/common.scss';
	@import '@/styles/color.scss';
	@import '@/styles/padding.scss';
	@import '@/styles/margin.scss';
	@import '@/styles/width.scss';
	@import '@/styles/height.scss';

	page,
	view,
	text {
		box-sizing: border-box;
	}

	.navBar {

		.title {
			position: relative;
		}

		.back-icon {
			position: absolute;
			left: 0;
			top: 0;
			width: 56rpx;
			height: 56rpx;
		}
	}
</style>